layui.define(['layer', 'cosjs'], function (exports) {
	var $ = layui.jquery,cosjs = layui.cosjs;

	function login(query){
        let index = layer.load(2);
        let  url ='/login/verify';
		cosjs.post(url,query).then(ret=>{
            window.location.href ='/main/selectNew';
		}).catch(err=>{
            cosjs.alert(err);
            layer.close(index);
		})
		return false;
	}
    exports('login',login);
})